package com.wmwu.mybatistest.enums;

import com.wmwu.mybatistest.condition.DataAuthAdminWithUserCondition;
import com.wmwu.mybatistest.utils.ICommEnum;
import com.wmwu.mybatistest.utils.Tools;

/**
 * @author : wmwu
 * @data : 2022/6/23 16:44
 */
public enum DataScope implements ICommEnum<String> {
    // I
    I("1", "仅限名称为人民币的记录可以查看", DataAuthAdminWithUserCondition.class),
    // II
    II("1", "仅限名称为美元的记录可以查看", DataAuthAdminWithUserCondition.class);

    private Class aClass;

    DataScope(String id, String desc, Class aClass) {
        this.addEnum(this, id, desc);
        this.aClass = aClass;
    }

    public Class getaClass() {
        return aClass;
    }

    public String getFieldClassName() {
        return Tools.firstCharToLower(Tools.getShortName(this.aClass.getName()));
    }
}
